# Contributor: Drew DeVault <sir@cmpwn.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-cssselect2
_pyname=cssselect2
pkgver=0.3.0
pkgrel=0
pkgdesc="CSS selectors for Python ElementTree"
url="https://pypi.org/projects/cssselect2/"
arch="noarch"
license="BSD-3-Clause"
depends="py3-tinycss2"
makedepends="py3-setuptools py3-pytest"
_pypiprefix="${_pyname%${_pyname#?}}"
source="
	https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz
	tests.patch
"
builddir="$srcdir"/$_pyname-$pkgver

build() {
	python3 setup.py build
}

check() {
	python3 setup.py pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="ae59314654d1c1ddf982b77521de7743d1496145a1367f51e02b6067d6757940e7ccb50b67959630f472972473a1e87cec8dfbc8eeb68ad5f16465a36b1447be  cssselect2-0.3.0.tar.gz
81fe8c58ca2a872a3bbb56be067f6140e6c43bdbab10957d66f6f79c3350b133be08a2a813f62ad64361f2475712bd06837e43e5002cf48f672c7027dbab2028  tests.patch"
